//
//  BaseSendCommand.h
//  sHome
//
//  Created by tracyhenry on 2019/7/30.
//  Copyright © 2019 SiterWell. All rights reserved.
//

#ifndef BaseSendCommand_h
#define BaseSendCommand_h

//command
#define ControllDevice 1
#define AddDevice 2
#define ReplaceDevice 3
#define SyncDevice 4
#define EditDeviceName 5
#define ChooseSystemScene 6
#define CancelAddDevice 7
#define AddScene 8
#define SyncScenes 9
#define DelteScene 10
#define GatewaySetting 12
#define SyncSingleSubDevice 16
#define GATEWAYTIME_UPLOAD 21
#define AddSystemScene 23
#define SyncDeviceName 24
#define SyncSystemScenes 32
#define ClickToAction 38
#define DeleteSystemScene 39
#define SyncTimerSwitch 41
#define DeleteTimerSwitch 42
#define GetWarnLogs 44
#define DeleteWarnLogs 46
#define GetSubLogs 47
#define DeleteSubLogs 49
#define PutToRoom 53
#define SyncDeviceNew 54
#define AutoRename 57
#define SyncAutoName 58
#define SyncAutoNamePlus 59
#define VoiceSetting 61
#define GetDeviceCurveLog 63
#define DeleteDeviceCurveLog 65
#define GetDeviceTotalCurveLog 67
#define CheckGatewayIsOnline 73
#define GetGS940SubDevices 75
#define GATEWAYTIMEZONE_UPLOAD 251
#define SendDeviceId 65534
//updata
#define ANWSER_OK  11
#define GETGATEAYSETTING  13
#define DEVICE_NAME_UPLOAD 17
#define DEVICE_STATUS_UPLOAD 19
#define GATEWAY_ALERT_INFO 25
#define SCENE_MODE_UPLOAD 26
#define SCENE_UPLOAD 27
#define CURRENT_SCENE_UPLOAD 28
#define WarnLogs_UPLOAD 45
#define SubLogs_UPLOAD 48
#define SubDevice_UPLOAD 55
#define SubDevice_PLUS_UPLOAD 56
#define AutoName_UPLOAD 60
#define AddNewSubDevice 62
#define DeviceCurveLog 64
#define DeviceTotalInfo_UPLOAD 66
#define GS940_SubDevice_UPLOAD 76

static NSString *const updateTopic = @"$aws/things/%@/shadow/name/shadowName/update";

typedef  void(^Error_handler)(NSError * error,id data);

@interface BaseSendCommand : NSObject

@property(nonatomic,copy) NSString * devId;
@property(nonatomic,copy) NSString * mac;
@property(nonatomic,assign) int msgId;
@property(nonatomic,strong) Error_handler handler;

-(id)init;

-(void)startWithObject:(void(^)(NSError *,id))handler;

- (id)requestArgumentCommand;


-(void)responseResult:(NSNumber *)cmdId withData1:(NSString *)data_str1 withData2:(NSString *)data_str2;

-(BOOL)responseArgumentCommandId:(int)cmdId;

- (id)requestCmdId;

-(BOOL)isMqttOnly;

-(void)msgChange;

-(BOOL)isSetApi;
@end

#endif /* BaseSendCommand_h */
